home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Gamer Resource Kit / Hardcore Gamer Resource Kit - Disc 2.iso / Pc / K_O / MACH11.ZIP / UPDATE.BAT < prev   
DOS Batch File  |  1995-06-19  |  2KB  |  83 lines

  1. @echo off
  2. cls
  3.  
  4.  
  5. REM ******* CHECKING FOR THE RIGHT PARAMETERS AND ERROR *******
  6.  
  7. REM Checking for proper command line usage
  8. if "%1" == "" goto usage
  9. if "%2" == "" goto usage2
  10.  
  11. REM Checking for existing directory
  12. if not exist %1\%2\prince.exe goto usage3
  13.  
  14. REM Checking for proper drive
  15. if not exist mach_v11.exe goto usage4
  16.  
  17. REM Checking for error while updating
  18. if errorlevel 1 goto error1
  19.  
  20.  
  21.  
  22. REM  *********** UPDATING ***********
  23.  
  24. echo.
  25. echo Updating Machiavelli the Prince...
  26. echo.
  27. copy MACH_V11.EXE %1\%2
  28. %1
  29. cd \%2
  30. MACH_V11.EXE
  31. PATCH.EXE
  32. del MACH_V11.EXE
  33. del PATCH.*
  34. goto end
  35.  
  36.  
  37.  
  38. REM  ******* MESSAGES ******
  39.  
  40. :usage
  41. cls
  42. echo *******   Please supply the correct PATH of your   *******
  43. echo *******   Machiavelli the Prince game directory.   *******
  44. echo *******                                            *******
  45. echo *******       Example:   UPDATE C: MPS\PRINCE      *******                                
  46.  
  47. goto EOF
  48.  
  49. :usage2
  50. cls
  51. echo *******   Please supply the path, typing the drive followed    *******
  52. echo *******          by a space and then the directory.            *******
  53. echo *******           Example:   UPDATE C: MPS\PRINCE              *******
  54. goto EOF
  55.  
  56. :usage3
  57. cls
  58. echo  *******  Unable to locate PRINCE.EXE in %1\%2 directory.  The
  59. echo  *******   path must have the original Machiavelli installed.
  60. echo  *******    Please double check the directory and try again.
  61. goto EOF
  62.  
  63. :usage4
  64. cls
  65. echo *******  This install must be run from the same DRIVE\DIRECTORY   *******
  66. echo ******* that the Machiavelli UPDATE files are located in.  Please *******
  67. echo *******    change to that DRIVE\DIRECTORY and run UPDATE again.   *******
  68. goto EOF
  69.  
  70. :error1
  71. cls
  72. echo ******* An error has occurred.  Please double check all the  *******
  73. echo *******  parameters and try the update again.  If it fails,  *******
  74. echo *******          get another copy of this update.            *******
  75. goto EOF
  76.  
  77. :end
  78. echo Installation Complete
  79. echo Type PRINCE in the game directory to play...
  80. echo.
  81.  
  82. :EOF
  83.